
#ifndef VIEWER_H_
#define VIEWER_H_

// TODO: check if I need all of these includes!
#include <vtkVersion.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderWindow.h>
#include <vtkSmartPointer.h>
#include <vtkChartXY.h>
#include <vtkTable.h>
#include <vtkPlot.h>
#include <vtkFloatArray.h>
#include <vtkContextView.h>
#include <vtkContextScene.h>
#include <vtkPen.h>
#include "Chart.h"

#include <vector>
using namespace std;

class Viewer
{
	vector<Chart*> _charts;

	// NOTE: I have tried to transform turn this variable in a class
	// attribute and add the views in the AddChart method to share the
	// work, but it (strangely) cause a bad_alloc error.
	// TODO: check it and correct!
	vector<vtkSmartPointer<vtkContextView> > views;

	public:
		Viewer();
		virtual ~Viewer();

		void AddChart(Chart *chart);
		void RemoveAllCharts();
		void View();
};

#endif /* VIEWER_H_ */
